# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Simon Zeni <simon@bl4ckb0ne.ca>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=vulkan-tools
_pkgname=Vulkan-Tools
pkgver=1.3.296.0
pkgrel=0
arch="all"
url="https://www.khronos.org/vulkan"
pkgdesc="Vulkan Utilities and Tools"
license="Apache-2.0"
makedepends="
	cmake
	glslang-dev
	libx11-dev
	libxrandr-dev
	python3
	samurai
	volk
	vulkan-headers
	vulkan-loader-dev
	wayland-dev
	wayland-protocols-dev
	"
source="https://github.com/KhronosGroup/Vulkan-Tools/archive/refs/tags/vulkan-sdk-$pkgver/vulkan-tools-sdk-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-vulkan-sdk-$pkgver"
options="!check" # No tests

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_SYSCONFDIR=/etc \
		-DCMAKE_INSTALL_DATADIR=/usr/share \
		-DCMAKE_SKIP_RPATH=True \
		-DBUILD_CUBE=ON \
		-DBUILD_VULKANINFO=ON \
		-DGLSLANG_INSTALL_DIR=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
66bc89272f150198cd52f2971ad67a2fd6c922ac4bafb420c0d54788ca6bab2246e8a153a09eccce15a87e1fe16fdeef16af1c6b6b13386bff79dd73858f3cae  vulkan-tools-sdk-1.3.296.0.tar.gz
"
